Provider's Waitlist Page
Overview
The Provider's Waitlist Page is a detailed view used for managing a provider's waitlists, availabilities, and notifications.

Features
1. Provider Information Display
The header section includes:
- Provider Avatar, Name & Role
- Search Functionality (handles search queries based on active tab )
- Filtering Options (options are different based on active tab)
- Dynamic Action Button (based on active tab, it reveal an action where necessary)
2. Tab-Based Data Management
The page utilizes a tabbed interface to switch between different datasets:
- Waitlist: Displays patients currently on the provider's waitlist (
useGetProviderWaitlistByIdQuery) - Availabilities: Lists available appointment slots (
useGetProviderAvailabilitiesQuery) - Notifications: Tracks updates related to waitlist actions (
useGetProviderNotificationsQuery)
Each tab is dynamically updated with active/open and completed/closed counts.
3. Search and Filter Options per Tab
- Waitlist Tab:
- Search by name or email,
- Filter by All, Active or Completed status
- Availabilities Tab:
- Search by date (MM-DD-YYYY, MMDDYYYY, or MM/DD/YYYY formats) or use the date picker icon to the right of the search bok to pick a date,
- Filter by All, Active, Completed, or Expired
- Notifications Tab:
- Search by patient name
- Filter by All, Open or Closed
4. Action Buttons per tab
- Waitlist Tab:
Add Patientbutton: this opens theCustomWaitlistDrawerwhich enables the clinic admin to add both existing and new patient's to the waitlist of the provider.
- Availabilities Tab:
Add Availabilitybutton: this opens theCustomAvailabilityDrawerwhich enables the clinic admin to an add availabilities for the provider.
- Notifications Tab:
- This has no action button tab
5. Data Tables per tab (DataTable Component)
- The Waitlist Tab displays patient information for the provider's waitlist: Each table row shows the following:
- Patient Details: Rendered via
TablePatient Component(includes name, DOB, and email) - Preferred Appointment Time: Formatted using
formatPreferredTime - Status: Managed via
StatusChip ComponentandcomputeWaitlistStatus - Action Column:
- Edit (is visible and on-click opens the side drawer with the
WaitlistFormprefilled with the waitlist info - only for patients withActivestatus) - Delete (calls
useDeletePatientFromWaitlistMutationAPI)
- Edit (is visible and on-click opens the side drawer with the
- Patient Details: Rendered via
Clicking a table row opens CustomViewEntityDrawer with the selected patient's waitlist data.
-
The Availability Tab displays the availabilities of the provider: Each table row shows the following:
- Date Time: Formatted via
formatDateToUTC. - Status: Rendered using
StatusChipcomponent. - Accepted By: Patient info rendered using
TablePatientcomponent. - Notifications Sent: count of notification sent out from.
- Action Column: Includes View Notifications, Edit, Delete.
Clicking a table row opens
CustomViewEntityDrawerwith the selected provider availability data.
- Date Time: Formatted via
-
The Notifications Tab displays waitlist notifications sent to patients based on provider availabilities: Each table row shows the following:
- Patient: Patient info rendered using
TablePatientcomponent. - Phone Patient phone number to which notification SMS was sent to.
- Availability Slot The availabity datetime, Formatted via
formatDateToUTC, for which the patient was notified. - Notified At The datetime formatied via
formatDateToUserTimezone, revealing when the SMS was sent out. - Status Either open or closed, revealing whether the availability which patients were notified for has been accepted by anyone or not. If a single patient accepts an availability solt, all notifications statuses sent out to other patient for that availability gets closed. Clicking a table row does nothing.
- Patient: Patient info rendered using
Pagination
All tables implement pagination via Paginate Component, with options to:
- Adjust items per page (
setitemsPerPagestate) - Navigate between pages (
setPagestate) - Fetch paginated data using the
perPageandpageparameters in API calls
SSE (Server-Sent Events)
The page subscribes to real-time updates via useSSE custom hook, listening to:
- Waitlist Events: Triggers
providersWaitlistRefetch(),refetch(),availabilityRefetch(), andnotificationRefetch(). - Availability Events: Triggers
availabilityRefetch()andnotificationRefetch()
Summary
The Provider's Waitlist Page is a React-based, API-driven module with state-managed, real-time updated patient, availability, and notification data. It integrates Redux for state persistence, SSE for real-time notifications, and a modular component structure for extensibility.